]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspacesView: Adapt to changes in windowManager
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 18 May 2013 18:53:49 +0000 (20:53 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 21 May 2013 20:42:28 +0000 (22:42 +0200)
The actionMoveWorkspace() function was changed in commit 8727661c1,
adapt its use in workspacesView as well.

https://bugzilla.gnome.org/show_bug.cgi?id=659288

js/ui/workspacesView.js

index 25140a8f11a1a0330ecc9ea95b91f7132ede77e3..50f079c3e74c32280db538c5a15b07f9477e453b 100644 (file)
@@ -760,15 +760,20 @@ const WorkspacesDisplay = new Lang.Class({
     _onScrollEvent: function(actor, event) {
         if (!this.actor.mapped)
             return false;
+        let activeWs = global.screen.get_active_workspace();
+        let ws;
         switch (event.get_scroll_direction()) {
         case Clutter.ScrollDirection.UP:
-            Main.wm.actionMoveWorkspace(Meta.MotionDirection.UP);
-            return true;
+            ws = activeWs.get_neighbor(Meta.MotionDirection.UP);
+            break;
         case Clutter.ScrollDirection.DOWN:
-            Main.wm.actionMoveWorkspace(Meta.MotionDirection.DOWN);
-            return true;
+            ws = activeWs.get_neighbor(Meta.MotionDirection.DOWN);
+            break;
+        default:
+            return false;
         }
-        return false;
+        Main.wm.actionMoveWorkspace(ws);
+        return true;
     }
 });
 Signals.addSignalMethods(WorkspacesDisplay.prototype);